Accept worklist.create_test_item actions and process with Modality Emulator - #162
Merged
Merged
Conversation
steventux
force-pushed
the
DTOSS-13119-accept-worklist-create-test-item
branch
2 times, most recently
from
July 14, 2026 14:09
25ba8fd to
e1a112b
Compare
…ulator Processes test worklist items immediately sending emulated DICOM files with sample images via the uploader.
steventux
force-pushed
the
DTOSS-13119-accept-worklist-create-test-item
branch
from
July 14, 2026 15:14
e1a112b to
acc6109
Compare
steventux
marked this pull request as ready for review
July 14, 2026 15:21
Contributor
There was a problem hiding this comment.
Pull request overview
Enables the gateway’s relay listener to accept a new worklist.create_test_item action (sent from Manage) and trigger the Modality Emulator to process the created worklist item(s), with support for passing a patient name into the MWL C-FIND query.
Changes:
- Added handling for
worklist.create_test_iteminRelayListener, including invoking Modality Emulator processing. - Updated
ModalityEmulatorto accept an optionalpatient_nameand include it in the C-FIND dataset. - Added/updated unit tests covering the new action and the new patient-name filtering behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/relay_listener.py |
Adds worklist.create_test_item handling and a helper to run Modality Emulator processing. |
src/modality_emulator.py |
Extends MWL query generation to optionally filter by PatientName. |
tests/test_relay_listener.py |
Adds coverage asserting worklist.create_test_item triggers Modality Emulator invocation. |
tests/test_modality_emulator.py |
Adds coverage asserting patient_name is forwarded into c_find_dataset. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
steventux
force-pushed
the
DTOSS-13119-accept-worklist-create-test-item
branch
from
July 14, 2026 15:56
ee3c5ed to
51480a0
Compare
steventux
force-pushed
the
DTOSS-13119-accept-worklist-create-test-item
branch
from
July 20, 2026 09:51
403c0b5 to
976fe38
Compare
Safeguard against accidentally processing items without a patient name in the C-FIND criteria. This ensures processing test items are correctly scoped.
steventux
force-pushed
the
DTOSS-13119-accept-worklist-create-test-item
branch
from
July 20, 2026 09:53
976fe38 to
cfb9072
Compare
carlosmartinez
approved these changes
Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Counterpart of https://github.com/NHSDigital/dtos-manage-breast-screening/pull/1728
This PR amends the relay listener so that it can accept test worklist items sent from Manage.
The test items are used to verify that we have relay connectivity, have a working gateway and are able to accept emulated dicom images via the manage API.
Relay listener is modified to identify a specific type of gateway action, it saves the test worklist item to the worklist db. then invokes the modality emulator's
process_worklist_itemsfunction immediately to emulate storing to PACS and uploading resulting dicom files to the Manage API.Jira link
https://nhsd-jira.digital.nhs.uk/browse/DTOSS-13119
Review notes
Review checklist